//
//  ViewController.m
//  Bracelet
//
//  Created by jing zhao on 2/12/15.
//  Copyright (c) 2015 jing zhao. All rights reserved.
//

#import "ViewController.h"

#import "MyWorkoutViewController.h"
#import "mycityModel/APImycityTodayTotal.h"
#import "HomeViewController.h"
#import "LogOnViewController.h"
#import "APIConnection.h"
#import "UserInfoManager.h"
#import "LeftMenuViewController.h"
#import "AppDelegate.h"
//#import "UserInfoManager.h"

@interface ViewController ()


@end

@implementation ViewController

-(void)setRegisterBool:(BOOL)boolRegister
{
  
  self.contentViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"contentController"];
//  self.menuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"menuController"];
    self.menuViewController = [[LeftMenuViewController alloc] initWithNibName:@"LeftMenuViewController" bundle:nil];
  UINavigationController *navigationController = (UINavigationController *)self.frostedViewController.contentViewController;
  if(boolRegister)
  {
      HomeViewController *secondViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"HomeViewController"];
//        navigationController.viewControllers = @[secondViewController];
//      [[(AppDelegate *)[[UIApplication sharedApplication] delegate] viewController].navigationController pushViewController:secondViewController animated:NO];
      UINavigationController *nav =(UINavigationController *)self.contentViewController;
      nav.viewControllers = @[secondViewController];
  }
  else
  {
//        LogOnViewController *logOnViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"LogOnViewController"];
//        navigationController.viewControllers = @[logOnViewController];
  }
}

- (void)viewDidLoad {
    [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(BOOL)prefersStatusBarHidden{
    //return YES;
    return NO;
}

- (void)awakeFromNib
{
//    self.contentViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"contentController"];
//    self.menuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"menuController"];
}



@end
